/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package msgclient;

/**
 *
 * @author Данила
 */
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import msgserver.*;

public class MSGClientImpl {
    
    static public Login login;
    static public RecieveMessageInterface server = null;

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       Registry registry;
       String serverAddress="192.168.1.72";
       String serverPort="3232";
       try{
           registry=LocateRegistry.getRegistry(
               serverAddress,
               (new Integer(serverPort)).intValue()
           );
           server=
              (RecieveMessageInterface)(registry.lookup("rmiServer"));
       }
       catch(RemoteException e){
           e.printStackTrace();
       }
       catch(NotBoundException e){
           e.printStackTrace();
       }
       
       
        login = new Login();
        login.setSize(300, 100);
        login.setVisible(true);
        
    }
}
